package com.atguigu.javase.bank;

public class Account {

	protected double balance;

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	public Account(double balance) {
		super();
		this.balance = balance;
	}
	
	public boolean deposit(double amt) {
		this.balance += amt;
		return true;
	}
	
	public boolean withdraw(double amt) {
		if(amt>this.balance) {
			return false;
		}
		this.balance -= amt;
		return true;
	}
}
